package com.ss.hello_spring_boot_starter;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author Ss
 * @version V1.0
 * @description 【获取配置文件信息和设置默认值】
 * @date 2019/1/28
 */

@ConfigurationProperties(prefix = HelloServiceProperties.HELLO_PREFIX)
@Component
public class HelloServiceProperties {

    public static final String HELLO_PREFIX = "spring.ss.hello";
    // 消息默认值
    private static final String MSG = "World!";
    // 消息内容
    private String msg = MSG;
    //
    private Boolean show = true;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Boolean getShow() {
        return show;
    }

    public void setShow(Boolean show) {
        this.show = show;
    }
}
